﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetTimeFromServer.aspx.cs" Inherits="GetTimeFromServer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Scripts/jquery-1.8.1.min.js" type="text/javascript"></script>
     <script type="text/javascript">
        $(document).ready(function() {
        $("button").click(function() {
                $.get("http://localhost/MyAppGetTimeFromServer/SendTime.aspx?q=" + Math.floor(Math.random()), function (data, status) {
                    alert("The time is: " + data + "\nStatus: " + status);
                });
            });
        });
</script>
</head>
<body>
     <button>Get Time from Server</button>
</body>
</html>
